<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
	 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link style="text/css" rel="stylesheet" href="css/upload.css">
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("img").click(function(){
		if(confirm("确认要删除该图片吗选择否则下载")){
			window.location.href="deletePic.do?filename="+$(this).attr("src");
		}else{
			window.location.href="downloadPic.do?filename="+$(this).attr("src");
		}
	});
	$("img"). dblclick(function(){
		if(confirm("确认要下载该图片吗")){
			window.location.href="downloadPic.do?filename="+$(this).attr("src");
		}
	});
});
</script>
</head>
<body>
	<div id="pic">
	<c:forEach items="${list }" var="pic">
		<table border="1" cellpadding="0" cellspacing="0">
			<tr>
				<td><img src="image/${pic} " width="61px" height="61px"></td>
			</tr>
			<tr>
			<td id="picname">${fn:substringBefore(pic,'.') }</td>
			</tr>
		</table>
		 </c:forEach>
	</div>
	<div id="form1">
		<form action="uploadImage2.do" method="post" enctype="multipart/form-data">
			<input type="file" name="photo" id="liulan"/><input
				type="submit" value="上传" id="shangchuan"/>
		</form>
	</div>
</body>
</html>